package com.ruoyi.common.constant;

/**
 * 代码生成通用常量
 * <p>
 * 该类定义了代码生成过程中使用的各种常量，包括模板类型、字段名称、数据库类型、HTML控件类型、Java数据类型以及查询方式等。
 * </p>
 *
 * @author ruoyi
 */
public class GenConstants {
    /**
     * 单表（增删改查）模板标识
     */
    public static final String TPL_CRUD = "crud";

    /**
     * 树表（增删改查）模板标识
     */
    public static final String TPL_TREE = "tree";

    /**
     * 主子表（增删改查）模板标识
     */
    public static final String TPL_SUB = "sub";

    /**
     * 树编码字段名
     */
    public static final String TREE_CODE = "treeCode";

    /**
     * 树父编码字段名
     */
    public static final String TREE_PARENT_CODE = "treeParentCode";

    /**
     * 树名称字段名
     */
    public static final String TREE_NAME = "treeName";

    /**
     * 上级菜单ID字段名
     */
    public static final String PARENT_MENU_ID = "parentMenuId";

    /**
     * 上级菜单名称字段名
     */
    public static final String PARENT_MENU_NAME = "parentMenuName";

    /**
     * 数据库中表示字符串类型的列类型集合
     */
    public static final String[] COLUMNTYPE_STR = {"char", "varchar", "nvarchar", "varchar2"};

    /**
     * 数据库中表示文本类型的列类型集合
     */
    public static final String[] COLUMNTYPE_TEXT = {"tinytext", "text", "mediumtext", "longtext"};

    /**
     * 数据库中表示时间类型的列类型集合
     */
    public static final String[] COLUMNTYPE_TIME = {"datetime", "time", "date", "timestamp"};

    /**
     * 数据库中表示数字类型的列类型集合
     */
    public static final String[] COLUMNTYPE_NUMBER = {"tinyint", "smallint", "mediumint", "int", "number", "integer",
            "bit", "bigint", "float", "double", "decimal"};

    /**
     * 页面中不需要编辑的字段集合
     */
    public static final String[] COLUMNNAME_NOT_EDIT = {"id", "create_by", "create_time", "del_flag"};

    /**
     * 页面列表中不显示的字段集合
     */
    public static final String[] COLUMNNAME_NOT_LIST = {"id", "create_by", "create_time", "del_flag", "update_by",
            "update_time"};

    /**
     * 页面中不参与查询条件的字段集合
     */
    public static final String[] COLUMNNAME_NOT_QUERY = {"id", "create_by", "create_time", "del_flag", "update_by",
            "update_time", "remark"};

    /**
     * Entity基类中包含的基本字段集合
     */
    public static final String[] BASE_ENTITY = {"createBy", "createTime", "updateBy", "updateTime", "remark"};

    /**
     * Tree结构实体类中包含的基本字段集合
     */
    public static final String[] TREE_ENTITY = {"parentName", "parentId", "orderNum", "ancestors", "children"};

    /**
     * HTML文本框控件标识
     */
    public static final String HTML_INPUT = "input";

    /**
     * HTML文本域控件标识
     */
    public static final String HTML_TEXTAREA = "textarea";

    /**
     * HTML下拉框控件标识
     */
    public static final String HTML_SELECT = "select";

    /**
     * HTML单选框控件标识
     */
    public static final String HTML_RADIO = "radio";

    /**
     * HTML复选框控件标识
     */
    public static final String HTML_CHECKBOX = "checkbox";

    /**
     * HTML日期时间控件标识
     */
    public static final String HTML_DATETIME = "datetime";

    /**
     * HTML图片上传控件标识
     */
    public static final String HTML_IMAGE_UPLOAD = "imageUpload";

    /**
     * HTML文件上传控件标识
     */
    public static final String HTML_FILE_UPLOAD = "fileUpload";

    /**
     * HTML富文本编辑器控件标识
     */
    public static final String HTML_EDITOR = "editor";

    /**
     * Java中String类型标识
     */
    public static final String TYPE_STRING = "String";

    /**
     * Java中Integer类型标识
     */
    public static final String TYPE_INTEGER = "Integer";

    /**
     * Java中Long类型标识
     */
    public static final String TYPE_LONG = "Long";

    /**
     * Java中Double类型标识
     */
    public static final String TYPE_DOUBLE = "Double";

    /**
     * Java中BigDecimal高精度计算类型标识
     */
    public static final String TYPE_BIGDECIMAL = "BigDecimal";

    /**
     * Java中Date时间类型标识
     */
    public static final String TYPE_DATE = "Date";

    /**
     * 模糊查询方式标识
     */
    public static final String QUERY_LIKE = "LIKE";

    /**
     * 等值查询方式标识
     */
    public static final String QUERY_EQ = "EQ";

    /**
     * 表示“需要”状态的标识
     */
    public static final String REQUIRE = "1";
}
